(require test-engine/racket-gui)
(load "inter.rkt")

(reset)

(put-value "var1" 10)
(put-value "var2" 20)
(put-value "var3" 30)
(put-value "str" "ABC")
(put-value "bool" #t)
(put-value "boolf" #f)
(put-value "list" (list 1 2 3 4 5))


(store-process-values-sum (make-process-sum-values "summed" (list "var1" "var2" "var3")))
(check-expect (get-value "summed") 60)


(check-expect (valid-boolean #t) #t)
(check-expect (valid-boolean 'true) #t)
(check-expect (valid-boolean 'what?) #f)

(check-expect (string->boolean #t) #t)
(check-expect (string->boolean 'true) #t)
(check-expect (string->boolean 'what?) #f)

(check-expect ((in-range 0 10) 5) #t)
(check-expect ((in-range 0 10) 10) #t)
(check-expect ((in-range 0 10) 9000) #f)

(check-expect (take (list 10 20 30 40) 2) 20)

(check-expect (input-length "list") 5)

(reset)